﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FarseerPhysics.Common;

namespace SpriteGame.Helpers
{
    class GeometryPool
    {
        static Dictionary<String, List<Vertices>> geometry = new Dictionary<string, List<Vertices>>();

        public static void AddGeometry(string _name, List<Vertices> _geometry)
        {
            geometry.Add(_name, _geometry);
        }

        public static void DumpLibrary(Dictionary<String, List<Vertices>> _geometry)
        {
            geometry = _geometry;
        }

        public static Dictionary<String, List<Vertices>> GetLibrary()
        {
            return geometry;
        }

        public static List<Vertices> GetGeometry(string _name)
        {
            if (geometry.ContainsKey(_name))
            {
                return geometry[_name];
            }
            else
            {
                return null;
            }
        }
    }
}
